/**      
 * @file		doWhile.cpp
 * @description		This file demonstrates the use of a do/while
 *			statement. Notice that this will be executed
 *			at least one time.
 * @course		CSCI 123 Section 00000
 * @assignment		Sample 11
 * @date		mm/dd/yyyy
 * @author		Brad Rippe (00000000) brippe@fullcoll.edu
 * @version		1.0
 */
#include <iostream>
using namespace std;

/**
 * @return zero if the application executes successfully
 */
int main() {
	int total		= 0;
	int gradeCounter	= 1;
	int gradeValue		= 0;
	bool loop		= true;

	do {
		cout << "Enter integer grade:\n";
		cin >> gradeValue;
		total += gradeValue;

		gradeCounter += 1;
		if(gradeCounter <= 10) {
			cout << "Do you want to continue? 1 for yes and 0 for no\n";
			cin >> loop;
		}
	} while(gradeCounter <= 10 && loop);

	int average = total / 10;
	cout << "Class average is " << average << endl;

	return 0;
}
